package MP
{
	/**
	 * ...
	 * @author 谭跃文
	 */
	public class NodeExpand extends Node
	{
		/**点池*/
		private static var NodePool:Vector.<NodeExpand> = new Vector.<NodeExpand>();
		/**点总数*/
		private static var numCount:int = 0;
		
		/**游泳区*普通*/
		public static const SWIM:int = 1;
		/**PK切*普通*/
		public static const PK:int = 2;
		/**安全区*普通*/
		public static const SAFE:int = 3;
		
		/**塔防区*特殊*/
		public static const TD:int = 0;
		/**技能阻挡区*特殊*/
		public static const STOP_SKILL:int = 1;
		/**危险区*特殊*/
		public static const DANGEROUS:int = 3;
		/**跳跃行走区*特殊*/
		public static const JUMP_ROAD:int = 6;
		/**飞行区*特殊*/
		public static const FLY:int = 7;
		
		/**基本类型*/
		public var normalType:int;
		/**特殊类型*/
		public var specialType:int;
		
		public function NodeExpand()
		{
			super();
		}
		
		/**
		 * 获取对应的行走点普通属性
		 * @param	type
		 * @return
		 */
		public function getNormalType(type:int):Boolean
		{
			return Boolean(normalType & 1 << type);
		}
		
		/**
		 * 获取对应的行走点特殊属性
		 * @param	type
		 * @return
		 */
		public function getSpecialType(type:int):Boolean
		{
			return Boolean(specialType & 1 << type);
		}
		
		override public function dispose():void 
		{
			normalType = 0;
			specialType = 0;
			reset();
			NodePool.push(this);
		}
		
		public static function getNode():NodeExpand
		{
			var node:NodeExpand;
			if (NodePool.length == 0)
			{
				node = new NodeExpand();
				numCount++;
			}
			else
			{
				node = NodePool.pop();
			}
			return node;
		}
	}

}